ASM:=nasm
CC:=gcc
RM:=rm
IMG:=a.img
LD:=ld
kernel:=kernel/
boot:=boot/
total:=$(boot) $(kernel)
#clean:=$(boot) $(kernel)
$(total):
	make  --directory=$@ all
.PHONY: all $(total) 
all:$(total)
	dd if=boot/boot.bin of=a.img bs=512 count=1 conv=notrunc
	sudo mount -o loop a.img  point
	sudo cp boot/loader.bin point/
	sudo cp kernel/kernel.o  point/
	sleep 0.4s
	sudo umount point
